Computer Arithmetic Conversions between Binary and Decimal Systems
نویسنده
چکیده
We will first see how to convert a real number in binary form into its decimal equivalent. The key idea is that the binary digits to the left of the binary decimal point increase in factors of 2 for each place moved over. Similarly, the digits to the right of the binary decimal point decrease in factors of 2 for each place moved over. Consider the real number (101.1)2 in binary form. We have (101.1)2 = 1× 2 + 0× 2 + 1× 2 + 1× 2−1 = (5.5)10.
منابع مشابه
Correctly Rounded Binary-Decimal and Decimal-Binary Conversions
This note discusses the main issues in performing correctly rounded decimal-to-binary and binary-to-decimal conversions. It reviews recent work by Clinger and by Steele and White on these conversions and describes some efficiency enhancements. Computational experience with several kinds of arithmetic suggests that the average computational cost for correct rounding can be small for typical conv...
متن کاملDesign Exploration for Decimal Floating-Point Arithmetic
Commercial applications and databases typically store numerical data in decimal format. Currently, however, microprocessors do not provide instructions or hardware support for decimal floating-point arithmetic [ 1 ]. Consequently, decimal numbers are often read into computers, converted to binary numbers, and then processed using binary floating-point arithmetic. Results are then converted back...
متن کاملEasy Accurate Reading and Writing of Floating-Point Numbers
Presented here are algorithms for converting between (decimal) scientific-notation and (binary) IEEE-754 double-precision floating-point numbers. These algorithms are much simpler than those previously published. The values are stable under repeated conversions between the formats. The scientific representations generated have only the minimum number of mantissa digits needed to convert back to...
متن کاملDecimal Division Using the Newton–Raphson Method and Radix-1000 Arithmetic
Computer arithmetic is predominantly performed using binary arithmetic because the hardware implementations of the operations are simpler than those for decimal computation. However, many decimal fractions cannot be represented exactly as binary fractions with a finite number of bits. The value 0.1, for example, can only be represented as an infinitely recurring binary number. If a binary appro...
متن کاملFully redundant decimal addition and subtraction using stored-unibit encoding
Decimal computer arithmetic is experiencing a revived popularity, and there is quest for highperformance decimal hardware units. Successful experiences on binary computer arithmetic may find grounds in decimal arithmetic. For example, the traditional fully redundant (i.e., the result and both of the operands are represented in a redundant format) and semi-redundant (i.e., the result and only on...
متن کامل